/* ***********************
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is SiteNotes.js module.
 *
 * The Initial Developer of the Original Code is Rob Gerns.
 *
 * Portions created by the Initial Developer are Copyright (C) 2010
 * the Initial Developer. All Rights Reserved.
 *
 **************************/
 
 
/*************************************************
* Function Name(s): SiteNotes(); writeNotes()
*
* Purpose:
* Check to see if there is a "notes" node defined in the 
* 'brief' section of the Oister file.  If there is
* create the necessary div and write the notes  
* inside the div.
**************************************************/

function siteNotes(xmlDocument){	
    
 //Check to see if a notes node was included
 var checkNotes = xmlDocument.getElementsByTagName("notes");
    
 //If so, get it's value
 if(checkNotes!=undefined && checkNotes.length == 1) {
 
 var notes = checkNotes[0].firstChild.nodeValue;
		
	if(notes != undefined && notes != null){
	
	 //Call the writeNotes function to create the appropriate div
	 writeNotes(notes);
	}
 
 }
	
}

function writeNotes(notes){

 //If there are any notes, create the div and write the notes inside
 divNotes = document.createElement("div");
 notesId = divNotes.id = "notes";
 divNotes.className = "notes";
 document.getElementById('begin').appendChild(divNotes);
 document.getElementById(notesId).innerHTML = notes;
   
}